package cn.powerone.scm.service.impl;

import java.util.List;
import cn.powerone.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.powerone.scm.mapper.ScmInquiriesInMapper;
import cn.powerone.scm.domain.ScmInquiriesIn;
import cn.powerone.scm.service.IScmInquiriesInService;

/**
 * 客户询价单Service业务层处理
 * 
 * @author PowerOne
 * @date 2025-06-27
 */
@Service
public class ScmInquiriesInServiceImpl implements IScmInquiriesInService 
{
    @Autowired
    private ScmInquiriesInMapper scmInquiriesInMapper;

    /**
     * 查询客户询价单
     * 
     * @param id 客户询价单主键
     * @return 客户询价单
     */
    @Override
    public ScmInquiriesIn selectScmInquiriesInById(Long id)
    {
        return scmInquiriesInMapper.selectScmInquiriesInById(id);
    }

    /**
     * 查询客户询价单列表
     * 
     * @param scmInquiriesIn 客户询价单
     * @return 客户询价单
     */
    @Override
    public List<ScmInquiriesIn> selectScmInquiriesInList(ScmInquiriesIn scmInquiriesIn)
    {
        return scmInquiriesInMapper.selectScmInquiriesInList(scmInquiriesIn);
    }

    /**
     * 新增客户询价单
     * 
     * @param scmInquiriesIn 客户询价单
     * @return 结果
     */
    @Override
    public int insertScmInquiriesIn(ScmInquiriesIn scmInquiriesIn)
    {
        scmInquiriesIn.setCreateTime(DateUtils.getNowDate());
        return scmInquiriesInMapper.insertScmInquiriesIn(scmInquiriesIn);
    }

    /**
     * 修改客户询价单
     * 
     * @param scmInquiriesIn 客户询价单
     * @return 结果
     */
    @Override
    public int updateScmInquiriesIn(ScmInquiriesIn scmInquiriesIn)
    {
        scmInquiriesIn.setUpdateTime(DateUtils.getNowDate());
        return scmInquiriesInMapper.updateScmInquiriesIn(scmInquiriesIn);
    }

    /**
     * 批量删除客户询价单
     * 
     * @param ids 需要删除的客户询价单主键
     * @return 结果
     */
    @Override
    public int deleteScmInquiriesInByIds(Long[] ids)
    {
        return scmInquiriesInMapper.deleteScmInquiriesInByIds(ids);
    }

    /**
     * 删除客户询价单信息
     * 
     * @param id 客户询价单主键
     * @return 结果
     */
    @Override
    public int deleteScmInquiriesInById(Long id)
    {
        return scmInquiriesInMapper.deleteScmInquiriesInById(id);
    }

    @Override
    public int deleteScmInquiriesInByProjectProductIds(Long[] projectProductIds) {
        return scmInquiriesInMapper.deleteScmInquiriesInByProjectProductIds(projectProductIds);
    }

}
